package cn.jolyoulu.adminweb.entity.vo;

import lombok.Data;
import cn.jolyoulu.cmnservice.entity.po.SysDictData;

import java.util.Objects;

/**
 * @Author LuZhouJin
 * @Date 2023/3/17
 */
@Data
public class SysDictDataVO {

    /** 字典数据id */
    private String id;

    /** 字典标签 */
    private String dictLabel;

    /** 字典键值 */
    private String dictValue;

    /** 关联字典类型 */
    private String dictTypeId;

    /** 字典描述 */
    private String description;

    public SysDictDataVO(SysDictData sysDictData) {
        if (Objects.nonNull(sysDictData)) {
            this.id = sysDictData.getId();
            this.dictLabel = sysDictData.getDictLabel();
            this.dictValue = sysDictData.getDictValue();
            this.dictTypeId = sysDictData.getDictTypeId();
            this.description = sysDictData.getDescription();
        }
    }
}
